﻿<%@ page contentType="text/html; charset=utf-8" language="java" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<meta name="viewport"
	content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<link href="Styles/bootstrap.min.css" rel="stylesheet" />
<link href="Styles/bootstrap-responsive.min.css" rel="stylesheet" />
<link href="Styles/font-awesome.css" rel="stylesheet" />
<link href="Styles/adminia.css" rel="stylesheet" />
<link href="Styles/css/all.css" rel="stylesheet" />
	<script type="text/javascript" src="Scripts/spin.min.js"></script>
<link href="Styles/ui/jquery.ui.core.css" rel="stylesheet" />
<link href="Styles/ui/jquery.ui.core.min.css" rel="stylesheet" />
<link href="Styles/ui/jquery.ui.datepicker.css" rel="stylesheet" />
<link href="Styles/ui/jquery.ui.datepicker.min.css" rel="stylesheet" />
<link href="Styles/ui/jquery.ui.all.css" rel="stylesheet" />
<link href="Styles/ui/jquery.ui.theme.css" rel="stylesheet" />
<link href="Styles/ui/jquery.ui.theme.min.css" rel="stylesheet" />
<link href="Styles/mainjsp.css" rel="stylesheet" />

<link rel="stylesheet" href="Styles/test/ping.css" type="text/css" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script type="text/javascript">
	//NS.showComp("deviceNav")
	
		//$.post("data", { "func": "getNameAndTime" },
		//	   function(data){
			//     alert(data.name); // John
			//     console.log(data.time); //  2pm
			//   }, "json");
	
	
</script>
<script type="text/javascript" src="Scripts/jquery-1.7.2.min.js"></script>
<script type="text/javascript" src="Scripts/ui/jquery.ui.core.min.js"></script>
<script type="text/javascript" src="Scripts/ui/jquery.ui.datepicker-zh-CN.min.js"></script>
<script type="text/javascript" src="Scripts/ui/jquery.ui.datepicker.min.js"></script>



</head>
<body>


	<div id="commonDiv"  style="width: 300px;height: 300px;display: none;">

	</div>
	<div id="backDiv"  style="display: none;" ></div>
	<div class="content-min" style="width: 1200px;">
		<div class="fl w_860 m_r30" style="width: 1200px;">
			<h1 class="page-title">
				驻地网测试网页后台管理系统
			</h1>
			<div class="widget" style="width: 1168px;">
				<div class="widget-content" style=" width: 1168px;padding-bottom: 15px;">
					<div id="header" style="width: 1168px; height: 38px;">

						<ul class="nav">
							<li id="li1" class="first"><a  href="#" onclick="showDiv(0)">原始数据</a>
							</li>
							<li class="bg"></li>
							<li id="li2"><a  href="#" onclick="showDiv(1)">公司排名</a>
							</li>
							<li class="bg"></li>
							<li id="li3" style="display: none"><a  href="#" onclick="showDiv(2)">公司排名</a>
							</li>
							<li class="bg"></li>
							<li id="li4"><a  href="#" class="last" onclick="showDiv(3)">街道小区排名</a>
							</li>
							<li class="bg"></li>
							<li id="li5" ><a  href="#" class="last" onclick="showDiv(4)">导出综合报表</a>
							</li>
							<li class="bg"></li>
							<li id="li6" >
								<a  href="#" class="last" >系统工具</a>
									<div class="nav-w">
											<div class="section-nav1">
												<ul>
													<li><a href="#" onclick="showDiv(5)">账号管理</a></li>
													<li><a href="#" onclick="showDiv(6)">网速测试配置</a></li>
													<li><a href="#" onclick="showDiv(7)">评分配置</a></li>
												</ul>
											</div>
									</div>
							</li>
						
						</ul>

					</div>
						<%@include file="rawData.jsp"%> 
						<%@include file="grade.jsp"%> 
						<%@include file="companyGrade.jsp"%> 
						<%@include file="vlanGrade.jsp"%> 
						<%@include file="userManage.jsp"%> 
						<%@include file="userUrl.jsp"%> 
						<%@include file="gradeSetting.jsp"%> 
						<%@include file="allDataToExcel.jsp"%> 
				</div>
					
			</div>

		</div>
	</div>
	<script type="text/javascript">
		
	var jsps = ["rawDataDiv","gradeDiv","companyGradeDiv","vlanGradeDiv", "allDataToExcelDiv","userManageDiv","userUrlDiv","gradeSettingDiv"];
	var lis = ["li1","li2","li3","li4","li5","li6"];
	//默认第一个选择栏被选中
	

	
	var user;
	$(function() {

		$("#li1" ).css("background","url('Styles/images/navbg_a.gif')repeat-x" );
		getRole();
		
	});
	
	
	function getRole(){
		
		
			$.post("user", {
				"types" : "getUser"
			}, function(data) {
	
				
				if (data != "" && data != null) {

					if (data.name != "admin") {
						
					
						$("#li6").hide();
						
					}
				}else{
					
					
					window.location.href="user?types=success"; 
				}
				
			},"json");
		}

		function showDiv(divNumber) {

			for ( var i = 0; i < jsps.length; i++) {

				if (i == divNumber) {
					$("#" + jsps[i]).show();
					
					if(divNumber>=5){
						
						$("#" + lis[5]).css("background","url('Styles/images/navbg_a.gif')repeat-x" );
					}else{
						
						$("#" + lis[i]).css("background","url('Styles/images/navbg_a.gif')repeat-x" );
					}
					
					
					
					
				
				}else {

					$("#" + jsps[i]).hide();
					$("#" + lis[i]).css("background","none" );
				}
			}

		}

		function updateMenuBackGroundColor() {

		}
		
		
		
		
		
		function initMenu(){
		
		var _speed = 400; // in ms
			var _hold = $('#header ul.nav');
			var _t = null;
			if (_hold.length) {
				var _list = _hold.children();
				_list.each(function() {
					
					var _el = $(this);
					var _box = _el.children('div.nav-w');
					var _sub = _box.children();
					_box.show().width(_sub.outerWidth()).hide();
					
					_el.mouseenter(function() {
						
						var _this = this;
						_t = setTimeout(function() {
							$(_this).css('zIndex', 10);
							_el.addClass('hover');
							if (_box.is(':hidden')) {
								_box.show();
								_sub.css('marginTop', -_sub.outerHeight());
							}
							_sub.stop().animate({
								marginTop : 0
							}, _speed);
						}, 300);
					}).mouseleave(function() {
						
						if (_t)
							clearTimeout(_t);
						var _this = $(this);
						$(this).css('zIndex', 5);
						if (_sub.length) {
							_sub.stop().animate({
								marginTop : -_sub.outerHeight()
							}, _speed, function() {
								_box.hide();
								_el.removeClass('hover');
								_this.css('zIndex', 1);
							});
						} else {
							_el.removeClass('hover');
						}
						
					});
					
					
				});
			}
		}

		$(document).ready(function() {

			initMenu();

		});
		var backwidth = document.body.scrollWidth;
		var backheight = window.screen.availHeight;
		$("#commonDiv").css("left", ((backwidth - 500) / 2) + "px");
		$("#commonDiv").css("top", 200 + "px");
		$("#backDiv").width(backwidth);
		$("#backDiv").height(backheight);

		
		
		
		function showCommonDiv(){
			
			$("#backDiv").show();
			$("#commonDiv").show();
			loading();
		}
		
		
		function closeCommonDiv(){
			$("#commonDiv").hide();
			$("#backDiv").hide();
			
			unload();
			
		}
		
		var spinner;
		function loading() {
			var opts = {
				lines : 13, // The number of lines to draw 菊花瓣的数目
				length : 14, // The length of each line 菊花瓣的长度
				width : 8, // The line thickness 菊花瓣的宽度
				radius : 20, // The radius of the inner circle 菊花中心的半径
				corners : 1, // Corner roundness (0..1) 菊花瓣的圆滑度(0--1)
				rotate : 0, // The rotation offset 让菊花旋转的角度
				color : '#000', // #rgb or #rrggbb 菊花的颜色
				speed : 1, // Rounds per second 菊花旋转的速度
				trail : 60, // Afterglow percentage 菊花旋转时的余辉
				shadow : false, // Whether to render a shadow 是否需要菊花的阴影
				hwaccel : false, // Whether to use hardware acceleration
									// 是否需要菊花高速旋转(硬件加速)
				className : 'spinner', // The CSS class to assign to the
										// spinner 菊花的classname
				zIndex : 2e9, // The z-index (defaults to 2000000000)
								// 菊花的z-index值
				top : 'auto', // Top position relative to parent in px
								// 菊花相对定位的top
				left : 'auto' // Left position relative to parent in px
								// 菊花相对定位的left
			};
			var target = document.getElementById('commonDiv');
			spinner = new Spinner(opts).spin(target);
		}
		
		function unload() {
			spinner.stop();
		}
	
	</script>
</body>
</html>
